<!-- NEWS -->
<div class="manager">
	<input type="hidden" id="token" name="token" value="<?php echo $this->token(); ?>" />
	<div class="mainActions"><a href="#" onclick="createItem('productsadds');" class="create-bt">AJOUTER</a> <a href="#" onclick="updateAll('productsadds');" class="updateall-bt">UPDATER</a> <a href="#" onclick="deleteGroup('productsadds');" class="delselected-bt">SUPPRIMER LES ITEMS SELECTIONNES</a> <a href="#" onclick="reloadView('#moduleInclude', 'productsadds');" class="create-bt">REFRESH</a></div>
	<?php
		foreach ($this->tproductsadds() as $add) {
	?>
	<div class="item">
		<div class="queries">
			<form name="newsForm" class="<?php echo $add->id(); ?>" action="#">
				<a href="#" onclick="deleteItem(<?php echo $add->id(); ?>, 'productsadds');" class="delete-bt"></a>
				<a href="#" onclick="updateItem(<?php echo $add->id(); ?>, 'productsadds');" class="update-bt"></a>
				<span class="size10">DELETE</span> <input style="vertical-align:-6px;" type="checkbox" class="delete" name="delete" value="1">
				<input type="hidden" class="id" name="id" value="<?php echo $add->id(); ?>" />
				<input type="text" class="title" name="title" value="<?php echo $add->title(); ?>" />
			</form>
		</div>
		<div class="output" id="<?php echo $add->id(); ?>">
			<?php
			$img = $add->img();
			$img = $img["original"];
			if ($img != "") {
				?>
				<div class="thumb productsadds" style="background-image:url('<?php echo $img; ?>');"><a href="<?php echo $img; ?>" target="_blank"></a></div><a class="delete-img" href="#" onclick="delete_img('<?php echo $img; ?>', 'productsadds');"></a>
				<?php
			}
			else {
				echo $add->img();
				?>
					<p>DROP ICON HERE<br /><img src="<?php echo URL_TPL; ?>backoffice/assets/img/drop.png" /></p>
				<?php
			}
			?>
		</div>
	</div>
	<?php
		}
	?>
</div>
<script type="text/javascript">
	$(".output").dropfile({maxfiles:1, dir:'products/adds/', module:'productsadds'});
</script>